package com.ruoyi.gybj.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gybj.mapper.StrategyMessageFieldMapper;
import com.ruoyi.gybj.domain.StrategyMessageField;
import com.ruoyi.gybj.service.IStrategyMessageFieldService;

/**
 * 策略消息字段Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-19
 */
@Service
public class StrategyMessageFieldServiceImpl implements IStrategyMessageFieldService 
{
    @Autowired
    private StrategyMessageFieldMapper strategyMessageFieldMapper;

    /**
     * 查询策略消息字段
     * 
     * @param id 策略消息字段主键
     * @return 策略消息字段
     */
    @Override
    public StrategyMessageField selectStrategyMessageFieldById(Long id)
    {
        return strategyMessageFieldMapper.selectStrategyMessageFieldById(id);
    }

    /**
     * 查询策略消息字段列表
     * 
     * @param strategyMessageField 策略消息字段
     * @return 策略消息字段
     */
    @Override
    public List<StrategyMessageField> selectStrategyMessageFieldList(StrategyMessageField strategyMessageField)
    {
        return strategyMessageFieldMapper.selectStrategyMessageFieldList(strategyMessageField);
    }

    /**
     * 新增策略消息字段
     * 
     * @param strategyMessageField 策略消息字段
     * @return 结果
     */
    @Override
    public int insertStrategyMessageField(StrategyMessageField strategyMessageField)
    {
        strategyMessageField.setCreateTime(DateUtils.getNowDate());
        return strategyMessageFieldMapper.insertStrategyMessageField(strategyMessageField);
    }

    /**
     * 修改策略消息字段
     * 
     * @param strategyMessageField 策略消息字段
     * @return 结果
     */
    @Override
    public int updateStrategyMessageField(StrategyMessageField strategyMessageField)
    {
        return strategyMessageFieldMapper.updateStrategyMessageField(strategyMessageField);
    }

    /**
     * 批量删除策略消息字段
     * 
     * @param ids 需要删除的策略消息字段主键
     * @return 结果
     */
    @Override
    public int deleteStrategyMessageFieldByIds(Long[] ids)
    {
        return strategyMessageFieldMapper.deleteStrategyMessageFieldByIds(ids);
    }

    /**
     * 删除策略消息字段信息
     * 
     * @param id 策略消息字段主键
     * @return 结果
     */
    @Override
    public int deleteStrategyMessageFieldById(Long id)
    {
        return strategyMessageFieldMapper.deleteStrategyMessageFieldById(id);
    }
}
